<template>
    <div class="booking-manage-template">
        <BookingDefault v-if="curPath.startsWith('default')" ref="bookingDefault"></BookingDefault>
        <BookingCreate v-if="curPath.startsWith('create')" ref="bookingCreate"></BookingCreate>
    </div>
</template>

<script>
    import BookingCreate from "../create/BookingCreate";
    import BookingDefault from "../default/BookingDefault";

    export default {
        name: "BookingManage",
        components: {BookingDefault, BookingCreate},
        data() {
            return {
                curPath: 'default'
            }
        },
        methods: {
            getWorkNo() {
                let number = this.curPath.split('@')[1];
                console.log(number)
            }
        },
        watch: {
            curPath() {
                this.getWorkNo();
            }
        }
    }
</script>

<style lang="scss">
    .booking-manage-template {
        background-color: #ffffff;
        width: 100%;
        height: 100%;
    }
</style>